import os
import cv2 as cv


class ImageRead(object):
    def __init__(self):
        self.image = []
        self.images = []

    def read_image(self, image_path):
        self.image = cv.imread(image_path)

    def read_directory(self, directory_name):
        for filename in os.listdir(r"./" + directory_name):
            img = cv.imread(directory_name + "/" + filename)
            self.images.append(img)
        return self.images
